package com.gitee.elf.core.entity.ai

import com.gitee.elf.core.entity.AbstractBukkitProxyEntity
import com.gitee.elf.core.entity.EntityInstance
import org.bukkit.Location
import org.bukkit.World
import org.bukkit.entity.Entity
import org.bukkit.entity.LivingEntity

abstract class AbstractBukkitEntityAi(instance: EntityInstance) : AbstractEntityAi(instance) {

    val bukkitMapping = (mappingInstance!! as AbstractBukkitProxyEntity)

    val bukkitEntity = bukkitMapping.entity as Entity

    val bukkitLivingEntity = bukkitEntity as? LivingEntity

    val entityWorld : World
        get() = bukkitEntity.world

    val entityLocation : Location
        get() = bukkitEntity.location

}